<ui:composition template="/admin/templates/ui2.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    xmlns:fn="http://java.sun.com/jsp/jstl/functions"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:sec="http://www.springframework.org/security/facelets/tags">



    <ui:define name="content">
    
    <div class="entry">
    	<p:toolbar>
            <p:toolbarGroup>
	            <h:outputLabel style="padding-left: 15px;" value="#{commonMsg.currentPositionLabel}休息日列表"></h:outputLabel>
            </p:toolbarGroup>
            <p:toolbarGroup align="right">
	            <p:separator />  
	            <p:button value="添加休息日" outcome="/admin/checktime/Empholidayadd"></p:button>
            </p:toolbarGroup>
        </p:toolbar>
        
        <h:form id="form"> 
        	<p:spacer></p:spacer> 
               <p:panel id="filters">
                    <h:outputLabel style="padding-left: 15px;" value="查询日期"></h:outputLabel>
                    <p:calendar value="#{empHolidayList.holiday}" pattern="yyyyMMdd"></p:calendar>
                   <ui:fragment>
							<p:commandButton update="dataTable" process="filters"
								value="#{commonMsg.searchLabel}"></p:commandButton>
							<p:button value="#{commonMsg.resetLabel}"
								onclick="location.reload();return;"></p:button>
						</ui:fragment>
                </p:panel>
               
               
            <p:spacer></p:spacer> 
            <p:spacer></p:spacer> 
				<p:dataTable lazy="true" id="dataTable"
					value="#{empHolidayList.lazyModel}" var="eh" paginator="true"
					paginatorPosition="bottom" rows="15"
					rowsPerPageTemplate="15,50,100"
					currentPageReportTemplate="#{commonMsg.pageReportTemplate}"
					paginatorTemplate="#{commonMsg.paginatorTemplate}"
					
					emptyMessage="#{commonMsg.noResultMsg}" rowIndexVar="i">
	
					
					<p:column style="text-align:center;" sortBy="empHoliday.holiday">
						<f:facet name="header">
							<h:outputText value="日期"></h:outputText>
						</f:facet>
						<h:outputText value="#{eh.holiday}">
							<f:convertDateTime pattern="yyyyMMdd" timeZone="GMT+8"></f:convertDateTime>
						</h:outputText>
					</p:column>
					<p:column style="text-align:center;">
						<f:facet name="header">
							<h:outputText value="备注"></h:outputText>
						</f:facet>
						<h:outputText value="#{eh.status}">
							<f:convertDateTime pattern="yyyyMMdd" timeZone="GMT+8"></f:convertDateTime>
						</h:outputText>
					</p:column>
					
				</p:dataTable>
          
           
            </h:form>
      </div>
    </ui:define> 
</ui:composition>
